Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1122 refactor secp256k1 #1258

Merged
merged 8 commits into from
Sep 9, 2024
Merged

1122 refactor secp256k1 #1258

merged 8 commits into from
Sep 9, 2024

Conversation

lucanicoladebiasi
Copy link
Contributor

Description

The class packages/core/src/secp256k1/Secp256k1.ts unifies any reference to SECP256K1 functionalities, constants and methods. Albeit the class is made of static methods, this approach simplifies name space conflicts with 3rd parties libraries exporting secp256k1 constants and it is coherent with the OOP paradigm adopted in the SDK.

The examples and documentation are reviewed, the docs/diagrams/architecture/secp256k1.md file documents the class.

Code documentation reports precisely the noble/scure use of cryptographic sensitive algorithms and the fall-back to global.crypto for the runtime throwing exceptions.

Fixes # (issue)

Type of change

Please delete options that are not relevant.

  • Breaking change (fix or feature that would cause existing functionality to not work as expected) limited to renamed references.
  • This change requires a documentation update: done.

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • yarn test:examples
  • yarn test:solo
  • yarn test:unit

Test Configuration:

  • Node.js Version: v20.14.0
  • Yarn Version: 1.22.22

Checklist:

  • My code follows the coding standards of this project
  • I have performed a self-review of my code
  • I have commented on my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • New and existing integration tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules
  • I have not added any vulnerable dependencies to my code

Copy link

github-actions bot commented Sep 9, 2024

Test Coverage

Summary

Lines Statements Branches Functions
Coverage: 99%
99.41% (4073/4097) 98.23% (1278/1301) 99.75% (807/809)
Title Tests Skipped Failures Errors Time
core 794 0 💤 0 ❌ 0 🔥 1m 30s ⏱️
network 668 0 💤 0 ❌ 0 🔥 4m 3s ⏱️
errors 42 0 💤 0 ❌ 0 🔥 14.129s ⏱️

@lucanicoladebiasi lucanicoladebiasi marked this pull request as ready for review September 9, 2024 15:01
@lucanicoladebiasi lucanicoladebiasi requested a review from a team as a code owner September 9, 2024 15:01
@lucanicoladebiasi lucanicoladebiasi merged commit 84f0c52 into main Sep 9, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

refactor secp256k1
2 participants